<% add_decidim_page_title(t(".title")) %>

<div class="item_show__header">
  <h1 class="item_show__header-title">
    <%= t(".title") %>
  </h1>
</div>

<div class="item__edit item__edit-1col">
  <div class="item__edit-form">
    <%= decidim_form_for(@form, url: budget_proposals_import_path(budget), html: { class: "form form-defaults import_proposals" }) do |f| %>
      <% if @form.origin_components.any? %>
        <div class="form__wrapper">
          <div class="card">
            <div class="card-divider"></div>
            <div class="card-section">
              <div class="row column">
                <%= f.select :origin_component_id, @form.origin_components_collection, prompt: t(".select_component"), label: t(".origin_component_id") %>
              </div>
              <div class="row column">
                <%= f.number_field :default_budget, label: t(".default_budget") %>
              </div>
              <div class="row column">
                <%= f.check_box :import_all_accepted_proposals, label: t(".import_all_accepted_proposals") %>
              </div>
            </div>
          </div>
        </div>

        <div class="item__edit-sticky">
          <div class="item__edit-sticky-container">
            <%= f.submit t(".create"), class: "button button__sm button__secondary" %>
          </div>
        </div>
      <% else %>
        <p><%= t(".no_components") %></p>
      <% end %>
    <% end %>
  </div>
</div>
